﻿namespace DesktopRibbon
{
    using System.Diagnostics;
    using System.Windows;

    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {

        /// <summary>
        /// Returns the application data directory (%appdata%\DesktopRibbon). The directory is created if not existent.
        /// </summary>
        static public string DataDir()
        {
            string appData = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
            var appDataDir = new System.IO.DirectoryInfo(appData);
            appDataDir = appDataDir.CreateSubdirectory("DesktopRibbon");
            return appDataDir.ToString();
        }

        /// <summary>
        /// Generic application initialization (currently only outputs the main thread id for debugging purposes).
        /// </summary>
        public App()
        {
            Trace.Write(string.Format("Main thread id: {0}\n", System.Threading.Thread.CurrentThread.ManagedThreadId));
        }
    }
}
